﻿@model IEnumerable<blacksoft.Models.Detalle_OrdenCompra>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutCompras.cshtml";
}

<h2>Detalle Orden de Compra</h2>

<p>
    @Html.ActionLink("Nuevo", "Create")
</p>
<div class="block big">
    <div class="block_cont">
        <table class="data-table">
            <thead>
                <tr>
                    <th>
                        @Html.DisplayNameFor(model => model.Cantidad)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Subtotal)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Precio)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.OrdenCompra.Estado)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Producto.Nombre)
                    </th>
                    <th></th>
                </tr>
            </thead>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.Cantidad)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Subtotal)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Precio)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.OrdenCompra.Estado)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Producto.Nombre)
                    </td>
                    <td>
                        @Html.ActionLink("Editar", "Edit", new { id = item.IDDetalle_OrdenCompra }) |
                        @Html.ActionLink("Detalles", "Details", new { id = item.IDDetalle_OrdenCompra }) |
                        @Html.ActionLink("Borrar", "Delete", new { id = item.IDDetalle_OrdenCompra })
                    </td>
                </tr>
            }

        </table>
    </div>
</div>